﻿/**
 * @author sminutoli
 */
import com.dinmax.flash.draw.cabeza.*

class com.dinmax.flash.central.bridge.USERDataBridge
extends ControlCabeza
implements SelectedListener {
	
	private var txt_userNick:TextField;
	private var nick:String;
	
	private var txt_userName:TextField;
	private var name:String;
	
	private var mcSendMail:ButtonCabeza;
	private var mail:String;
	
	private var mcPhoto:MovieClip;
	
	public function initChild(child:MovieClip):Void {
		switch (child){
			case this.mcSendMail:
			this.mcSendMail.addListener(this);
			break;
		};
	};
	
	function onLoad():Void {
		this.txt_userName.text = this.getName();
		this.txt_userNick.text = this.getNick();
		return;
	};
	
	public function selected(control:ControlCabeza):Void {
		switch(control){
			case this.mcSendMail:
			getURL("mailto:"+this.getMail());
			break;
		};
		return;
	};
	
	public function getName():String {
		return name;
	}

	public function setName(name:String):Void {
		this.name = name;
		this.onLoad();
		return;
	}

	public function getNick():String {
		return nick;
	}

	public function setNick(nick:String):Void {
		this.nick = nick;
		this.onLoad();
		return;
	}

	public function getMail():String {
		return mail;
	}

	public function setMail(mail:String):Void {
		this.mail = mail;
		this.onLoad();
		return;
	}

}